package com.jrx.anytxn.investor.handler;

import com.jrx.anytxn.common.exception.TxnBizException;
import com.jrx.anytxn.common.exception.TxnException;
import com.jrx.anytxn.investor.bean.InvestorFundRouteBean;
import com.jrx.anytxn.investor.dto.loan.SaveFundRouteReq;
import com.jrx.anytxn.investor.dto.loan.SaveFundRouteRes;
import com.jrx.anytxn.investor.entity.TlFundRouteLog;

/**
 * 联合贷放款路由处理接口
 *
 * @author liuyang
 * @date 2020-06-02
 */
public interface IInvestorLoanRouteHandler {

    /**
     * 联合贷资金源路由
     *
     * @param fundRouteLog 资金源路由记录
     * @return InvestorFundRouteBean 资金源路由结果
     * @throws Exception
     * @author liuyang
     * @date 2020-06-04
     */
    InvestorFundRouteBean fundRoute(TlFundRouteLog fundRouteLog) throws Exception;

    /**
     * 保存联合贷资金源路由请求
     *
     * @param saveFundRouteReq 资金源路由请求
     * @author liuyang
     * @date 2020-06-04
     */
    SaveFundRouteRes saveFundRoute(SaveFundRouteReq saveFundRouteReq) throws TxnBizException;

    /**
     * 通知api资金源路由结果
     *
     * @param fundRouteLog 资金源路由记录
     * @param fundId 资金源id
     * @return String 路由结果
     * @throws Exception
     * @author liuyang
     * @date 2020-06-16
     */
    String noticeApiFundResult(TlFundRouteLog fundRouteLog, String fundId) throws Exception;
}
